/**
 * Created by Melvin on 15/04/15.
 */
(function () {
    'use strict';

    angular.module('app.ejercicios')
        .service('EjerciciosService', ['restBaseUrl', '$http', EjerciciosService]);

    function EjerciciosService (restBaseUrl, $http) {
        var apiUrl = restBaseUrl + 'EjercicioService.svc/';

        this.Listar = function () {
            var req = {
                method: 'GET',
                url: apiUrl + 'Listar'
            };

            return $http(req);
        };

        this.aleatorioPorUbicacion = function() {
            var url = apiUrl + 'EjerciciosAleatorioPorUbicacion';
            return $http.get(url);
        };
    }
})();